#include <iostream>

/**
 * 乘车费用
 * 
 */
int main() {
    int a;
    std::cin >> a;

    if (a <=3) {
        std::cout << 14;
    }else {
        int price = (int)(14 + (a - 3) * 2.3);
        std::cout << price;
    }

    return 0;
}
